package com.ltmonitor.adas.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * adas报警附件记录
 */
@Entity
@Table(name = "AdasAttachment")
@org.hibernate.annotations.Proxy(lazy = false)
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class AdasAttachment implements Serializable {
    public static  String STATUS_NEW = "new";
    public static  String STATUS_UPLOADING = "uploading";
    public static  String STATUS_UPLOADED = "uploaded";
    public static  String STATUS_UPLOAD_FAILED = "failed";

    public static int FILE_TYPE_IMAGE = 0;
    public static int FILE_TYPE_AUDIO = 1;
    public static int FILE_TYPE_VIDEO = 2;
    public static int FILE_TYPE_BIN = 3;
    public static int FILE_TYPE_OTHER = 4;



    public AdasAttachment()
    {
        createDate = new Date();
        updateDate = new Date();
        status = "new";
    }

    // 唯一库表ID，没有实际意义
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private long id;

    private long vehicleId;

    private String plateNo;

    private String simNo;
    /**
     * 平台分配的唯一报警编号
     */
    private String alarmNo;

    private String fileName;
    /**
     * 相对目录
     */
    private String filePath;

    private int fileType;

    private int fileLength;

    private Date createDate;

    private String status;

    private Date updateDate;

    public long getVehicleId() {
        return vehicleId;
    }

    public void setVehicleId(long vehicleId) {
        this.vehicleId = vehicleId;
    }

    public String getPlateNo() {
        return plateNo;
    }

    public void setPlateNo(String plateNo) {
        this.plateNo = plateNo;
    }

    public String getSimNo() {
        return simNo;
    }

    public void setSimNo(String simNo) {
        this.simNo = simNo;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public int getFileType() {
        return fileType;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }

    public int getFileLength() {
        return fileLength;
    }

    public void setFileLength(int fileLength) {
        this.fileLength = fileLength;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getAlarmNo() {
        return alarmNo;
    }

    public void setAlarmNo(String alarmNo) {
        this.alarmNo = alarmNo;
    } 
}
